<?php

use app\library\traits\Restful;
/**
 * @name GoodController
 * @author root
 * @desc 默认控制器
 * @see http://www.php.net/manual/en/class.yaf-controller-abstract.php
 */
class GoodController extends BaseController {

    use Restful;

    public function read(){
            $name = new UserModel();
            $list = $name->get();

            $this->returnJson(1, 'success', (array)$list );
    }

    public function update()
    {
        $name = $this->getRequest()->getQuery();

        var_dump("##################");
        var_dump($this->getRequest()->getQuery());
        var_dump($this->getRequest()->getPost());
        var_dump($this->getRequest()->getParams());
        var_dump($this->getRequest()->getParams());
        $this->returnJson(1, 'update',$name);
    }



}
